﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WpfAGVSystem.Migrations
{
    public partial class TZAGV : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Abutment_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Type = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    ManipulatorId = table.Column<int>(type: "int", nullable: false),
                    ManipulatorStation = table.Column<int>(type: "int", nullable: false),
                    Beath = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ManipulatorSour = table.Column<int>(type: "int", nullable: false),
                    ManipulatorTarget = table.Column<int>(type: "int", nullable: false),
                    OvenTime = table.Column<int>(type: "int", nullable: false),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Abutment_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "AGV_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    IP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ControlAPI = table.Column<int>(type: "int", nullable: false),
                    NavigationAPI = table.Column<int>(type: "int", nullable: false),
                    AGVType = table.Column<int>(type: "int", nullable: false),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    AreaType = table.Column<int>(type: "int", nullable: false),
                    MaterialType = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BFQIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BFQPort = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AGV_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Airexpansionshaft_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    OptronicsIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LigthIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontHeight = table.Column<float>(type: "real", nullable: false),
                    Height = table.Column<float>(type: "real", nullable: false),
                    BackHeight = table.Column<float>(type: "real", nullable: false),
                    Unwind_Full = table.Column<int>(type: "int", nullable: false),
                    Unloading_Full = table.Column<int>(type: "int", nullable: false),
                    Unwind_Null = table.Column<int>(type: "int", nullable: false),
                    Unloading_Null = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Airexpansionshaft_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "AirShowerDoor",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DevID = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ModelID = table.Column<int>(type: "int", nullable: false),
                    OpenPointL = table.Column<int>(type: "int", nullable: false),
                    ClosePointL = table.Column<int>(type: "int", nullable: false),
                    OpenPointR = table.Column<int>(type: "int", nullable: false),
                    ClosePointR = table.Column<int>(type: "int", nullable: false),
                    OpenPointLed = table.Column<int>(type: "int", nullable: false),
                    ClosePointLed = table.Column<int>(type: "int", nullable: false),
                    OpenPointRed = table.Column<int>(type: "int", nullable: false),
                    ClosePointRed = table.Column<int>(type: "int", nullable: false),
                    DIorder = table.Column<int>(type: "int", nullable: false),
                    DOorder = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    StationL = table.Column<int>(type: "int", nullable: false),
                    StationR = table.Column<int>(type: "int", nullable: false),
                    Available = table.Column<bool>(type: "bit", nullable: false),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AirShowerDoor", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AreaType_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AreaType = table.Column<int>(type: "int", nullable: false),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AreaType_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AutomaticDoor_Entiy",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DeviceId = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    IoDevid = table.Column<int>(type: "int", nullable: false),
                    OpenIO = table.Column<int>(type: "int", nullable: false),
                    CloseIO = table.Column<int>(type: "int", nullable: false),
                    OpenPlaceIO = table.Column<int>(type: "int", nullable: false),
                    ClosePlaceIO = table.Column<int>(type: "int", nullable: false),
                    DIorder = table.Column<int>(type: "int", nullable: false),
                    DOorder = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false),
                    IsWifiModel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AutomaticDoor_Entiy", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "DetectCache_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    OptronicsIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LigthIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontHeight = table.Column<float>(type: "real", nullable: false),
                    Height = table.Column<float>(type: "real", nullable: false),
                    BackHeight = table.Column<float>(type: "real", nullable: false),
                    Unwind_Full = table.Column<int>(type: "int", nullable: false),
                    Unloading_Full = table.Column<int>(type: "int", nullable: false),
                    Unwind_Null = table.Column<int>(type: "int", nullable: false),
                    Unloading_Null = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DetectCache_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "DeviceStation_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreTaskType = table.Column<int>(type: "int", nullable: false),
                    TarTaskType = table.Column<int>(type: "int", nullable: false),
                    DeviceType = table.Column<int>(type: "int", nullable: false),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    AreaType = table.Column<int>(type: "int", nullable: false),
                    AgvType = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DeviceStation_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "EmptyCache_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Row = table.Column<int>(type: "int", nullable: false),
                    Col = table.Column<int>(type: "int", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false),
                    RowCount = table.Column<int>(type: "int", nullable: false),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EmptyCache_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "FinishedGet_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    TaskType = table.Column<int>(type: "int", nullable: false),
                    TaskTypeOther = table.Column<int>(type: "int", nullable: false),
                    GetHeigh = table.Column<float>(type: "real", nullable: false),
                    PutHeigh = table.Column<float>(type: "real", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FinishedGet_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "FinishedPut_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    StationEmpty = table.Column<int>(type: "int", nullable: false),
                    PreStationEmpty = table.Column<int>(type: "int", nullable: false),
                    BackStationEmpty = table.Column<int>(type: "int", nullable: false),
                    AreaEmpty = table.Column<int>(type: "int", nullable: false),
                    TaskTypeEmpty = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    TaskType = table.Column<int>(type: "int", nullable: false),
                    GetHeigh = table.Column<float>(type: "real", nullable: false),
                    PutHeigh = table.Column<float>(type: "real", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FinishedPut_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "FullCache_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    IsCreatNoAGV = table.Column<bool>(type: "bit", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BakingState = table.Column<int>(type: "int", nullable: false),
                    Row = table.Column<int>(type: "int", nullable: false),
                    Col = table.Column<int>(type: "int", nullable: false),
                    ManipulatorStation = table.Column<int>(type: "int", nullable: false),
                    BakeState = table.Column<int>(type: "int", nullable: false),
                    OvenTime = table.Column<int>(type: "int", nullable: false),
                    TaskNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false),
                    Type = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FullCache_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "HistoricalTask_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    taskidid = table.Column<int>(type: "int", nullable: false),
                    TaskId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskType_TaskType = table.Column<int>(type: "int", nullable: false),
                    TaskTypeRemark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontMaterialType = table.Column<int>(type: "int", nullable: true),
                    BackMaterialType = table.Column<int>(type: "int", nullable: true),
                    Station = table.Column<int>(type: "int", nullable: false),
                    MacTaskState = table.Column<int>(type: "int", nullable: false),
                    AGVID = table.Column<int>(type: "int", nullable: false),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    AreaType = table.Column<int>(type: "int", nullable: false),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    StationAction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontHeight = table.Column<float>(type: "real", nullable: false),
                    Height = table.Column<float>(type: "real", nullable: false),
                    BackHeight = table.Column<float>(type: "real", nullable: false),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ImplementTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FinishTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ZC = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OvenId = table.Column<int>(type: "int", nullable: false),
                    OvenPostion = table.Column<int>(type: "int", nullable: false),
                    TaskNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ManipulatorSour = table.Column<int>(type: "int", nullable: false),
                    ManipulatorTager = table.Column<int>(type: "int", nullable: false),
                    IsNoAgvTask = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HistoricalTask_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Lift_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    IP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Port = table.Column<int>(type: "int", nullable: false),
                    OneCallStation = table.Column<int>(type: "int", nullable: false),
                    OneCabinStation = table.Column<int>(type: "int", nullable: false),
                    TwoCallStation = table.Column<int>(type: "int", nullable: false),
                    TwoCabinStation = table.Column<int>(type: "int", nullable: false),
                    ThreeCallStation = table.Column<int>(type: "int", nullable: false),
                    ThreeCabinStation = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<int>(type: "int", nullable: false),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Lift_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Manipulator_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Ip = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StationL = table.Column<int>(type: "int", nullable: false),
                    StationR = table.Column<int>(type: "int", nullable: false),
                    Stations = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Manipulator_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "ManipulatorTB_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    ManipulatorId = table.Column<int>(type: "int", nullable: false),
                    ManipulatorIdStation = table.Column<int>(type: "int", nullable: false),
                    IsOnlin = table.Column<bool>(type: "bit", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ManipulatorTB_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "MapType_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MapType_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "MaterialName_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MaterialName_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "MaterialType_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MaterialType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MaterialType_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Oven_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Ip = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    Unwind_Full = table.Column<int>(type: "int", nullable: false),
                    Unwind_FullTobeBaked = table.Column<int>(type: "int", nullable: false),
                    Unloading_Full = table.Column<int>(type: "int", nullable: false),
                    Unwind_Null = table.Column<int>(type: "int", nullable: false),
                    Unloading_Null = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    state50 = table.Column<bool>(type: "bit", nullable: false),
                    state51 = table.Column<bool>(type: "bit", nullable: false),
                    state52 = table.Column<bool>(type: "bit", nullable: false),
                    state53 = table.Column<bool>(type: "bit", nullable: false),
                    state54 = table.Column<bool>(type: "bit", nullable: false),
                    state55 = table.Column<bool>(type: "bit", nullable: false),
                    state56 = table.Column<bool>(type: "bit", nullable: false),
                    state57 = table.Column<bool>(type: "bit", nullable: false),
                    state58 = table.Column<bool>(type: "bit", nullable: false),
                    state59 = table.Column<bool>(type: "bit", nullable: false),
                    state60 = table.Column<bool>(type: "bit", nullable: false),
                    state61 = table.Column<bool>(type: "bit", nullable: false),
                    state62 = table.Column<bool>(type: "bit", nullable: false),
                    state63 = table.Column<bool>(type: "bit", nullable: false),
                    state64 = table.Column<bool>(type: "bit", nullable: false),
                    state65 = table.Column<bool>(type: "bit", nullable: false),
                    state66 = table.Column<bool>(type: "bit", nullable: false),
                    state67 = table.Column<bool>(type: "bit", nullable: false),
                    state68 = table.Column<bool>(type: "bit", nullable: false),
                    state69 = table.Column<bool>(type: "bit", nullable: false),
                    state70 = table.Column<bool>(type: "bit", nullable: false),
                    state71 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh50 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh51 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh52 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh53 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh54 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh55 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh56 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh57 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh58 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh59 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh60 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh61 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh62 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh63 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh64 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh65 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh66 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh67 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh68 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh69 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh70 = table.Column<bool>(type: "bit", nullable: false),
                    Finsh71 = table.Column<bool>(type: "bit", nullable: false),
                    IsOnline = table.Column<bool>(type: "bit", nullable: false),
                    Manipulatorid = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Oven_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "OvenBeath",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    OvenID = table.Column<int>(type: "int", nullable: false),
                    Beath = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    StateNum = table.Column<int>(type: "int", nullable: false),
                    ManipulatorStation = table.Column<int>(type: "int", nullable: false),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OvenBeath", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Processingline_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    StationUp = table.Column<int>(type: "int", nullable: false),
                    PreStationUp = table.Column<int>(type: "int", nullable: false),
                    BackStationUp = table.Column<int>(type: "int", nullable: false),
                    AreaUp = table.Column<int>(type: "int", nullable: false),
                    StationDown = table.Column<int>(type: "int", nullable: false),
                    PreStationDown = table.Column<int>(type: "int", nullable: false),
                    BackStationDown = table.Column<int>(type: "int", nullable: false),
                    AreaDown = table.Column<int>(type: "int", nullable: false),
                    TaskTypeDown = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    TaskTypeUp = table.Column<int>(type: "int", nullable: false),
                    GetHeighUp = table.Column<float>(type: "real", nullable: false),
                    PutHeighUp = table.Column<float>(type: "real", nullable: false),
                    GetHeighDown = table.Column<float>(type: "real", nullable: false),
                    PutHeighDown = table.Column<float>(type: "real", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskTYpeThree = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Processingline_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "QueueModel_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    groupid = table.Column<int>(type: "int", nullable: false),
                    stations = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    No01 = table.Column<int>(type: "int", nullable: true),
                    No02 = table.Column<int>(type: "int", nullable: true),
                    No03 = table.Column<int>(type: "int", nullable: true),
                    No04 = table.Column<int>(type: "int", nullable: true),
                    No05 = table.Column<int>(type: "int", nullable: true),
                    No06 = table.Column<int>(type: "int", nullable: true),
                    No07 = table.Column<int>(type: "int", nullable: true),
                    No08 = table.Column<int>(type: "int", nullable: true),
                    No09 = table.Column<int>(type: "int", nullable: true),
                    No10 = table.Column<int>(type: "int", nullable: true),
                    No11 = table.Column<int>(type: "int", nullable: true),
                    No12 = table.Column<int>(type: "int", nullable: true),
                    No13 = table.Column<int>(type: "int", nullable: true),
                    No14 = table.Column<int>(type: "int", nullable: true),
                    No15 = table.Column<int>(type: "int", nullable: true),
                    No16 = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_QueueModel_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Rawfoilmachine_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    RawfoilmachineType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Rawfoilmachine_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Role_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    rol1ID = table.Column<int>(type: "int", nullable: false),
                    rol1Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AGVManagement = table.Column<bool>(type: "bit", nullable: false),
                    AreaManagement = table.Column<bool>(type: "bit", nullable: false),
                    AutomaticDoorManagement = table.Column<bool>(type: "bit", nullable: false),
                    CacheManagement = table.Column<bool>(type: "bit", nullable: false),
                    LocationManagement = table.Column<bool>(type: "bit", nullable: false),
                    ChargeStationManagement = table.Column<bool>(type: "bit", nullable: false),
                    RestAreaStationManagement = table.Column<bool>(type: "bit", nullable: false),
                    HistoricalTaskManagement = table.Column<bool>(type: "bit", nullable: false),
                    InfoManagement = table.Column<bool>(type: "bit", nullable: false),
                    LiftManagement = table.Column<bool>(type: "bit", nullable: false),
                    MapManagement = table.Column<bool>(type: "bit", nullable: false),
                    MaterialTypeManagement = table.Column<bool>(type: "bit", nullable: false),
                    QueueManagement = table.Column<bool>(type: "bit", nullable: false),
                    RoleManagement = table.Column<bool>(type: "bit", nullable: false),
                    StationManagement = table.Column<bool>(type: "bit", nullable: false),
                    SettingManagement = table.Column<bool>(type: "bit", nullable: false),
                    TaskManagement = table.Column<bool>(type: "bit", nullable: false),
                    TaskTypeManagement = table.Column<bool>(type: "bit", nullable: false),
                    UserManagement = table.Column<bool>(type: "bit", nullable: false),
                    MapResourceManagement = table.Column<bool>(type: "bit", nullable: false),
                    EmptyCacheManagement = table.Column<bool>(type: "bit", nullable: false),
                    DetectCacheManagement = table.Column<bool>(type: "bit", nullable: false),
                    OvenManagement = table.Column<bool>(type: "bit", nullable: false),
                    RawfoilmachineManagement = table.Column<bool>(type: "bit", nullable: false),
                    SlittingmachineManagement = table.Column<bool>(type: "bit", nullable: false),
                    AirexpansionshaftManagement = table.Column<bool>(type: "bit", nullable: false),
                    MaterialNameManagement = table.Column<bool>(type: "bit", nullable: false),
                    OvenBeathManagement = table.Column<bool>(type: "bit", nullable: false),
                    WirelessManagement = table.Column<bool>(type: "bit", nullable: false),
                    ManipulatorManagement = table.Column<bool>(type: "bit", nullable: false),
                    WasteGetManagement = table.Column<bool>(type: "bit", nullable: false),
                    WastePutManagement = table.Column<bool>(type: "bit", nullable: false),
                    FinishedGetManagement = table.Column<bool>(type: "bit", nullable: false),
                    FinishedPutManagement = table.Column<bool>(type: "bit", nullable: false),
                    WarehouseManagement = table.Column<bool>(type: "bit", nullable: false),
                    SsxManagement = table.Column<bool>(type: "bit", nullable: false),
                    ProcessinglineManagement = table.Column<bool>(type: "bit", nullable: false),
                    AirShowerDoorManagement = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Role_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Roll_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    rollID = table.Column<int>(type: "int", nullable: false),
                    rollName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Number = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roll_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Slittingmachine_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    PutAre = table.Column<int>(type: "int", nullable: false),
                    GetAre = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Slittingmachine_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SlittingmachineCache_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    SlittingmachineId = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    OptronicsIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LigthIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontHeight = table.Column<float>(type: "real", nullable: false),
                    Height = table.Column<float>(type: "real", nullable: false),
                    BackHeight = table.Column<float>(type: "real", nullable: false),
                    Unwind_Full = table.Column<int>(type: "int", nullable: false),
                    UnwindNoBake = table.Column<int>(type: "int", nullable: false),
                    UnwindNoTobeBake = table.Column<int>(type: "int", nullable: false),
                    Unloading_Full = table.Column<int>(type: "int", nullable: false),
                    UnloadingTobeBake = table.Column<int>(type: "int", nullable: false),
                    Unwind_Null = table.Column<int>(type: "int", nullable: false),
                    Unloading_Null = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BakingState = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SlittingmachineCache_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Ssx_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    Ip = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Port = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    PutPreStation = table.Column<int>(type: "int", nullable: false),
                    PutStation = table.Column<int>(type: "int", nullable: false),
                    PutBackStation = table.Column<int>(type: "int", nullable: false),
                    GetPreStation = table.Column<int>(type: "int", nullable: false),
                    GetStation = table.Column<int>(type: "int", nullable: false),
                    GetBackStation = table.Column<int>(type: "int", nullable: false),
                    PutTaskType = table.Column<int>(type: "int", nullable: false),
                    PutTaskTypeOther = table.Column<int>(type: "int", nullable: false),
                    GetTaskType = table.Column<int>(type: "int", nullable: false),
                    PutHeigh = table.Column<float>(type: "real", nullable: false),
                    GetHeigh = table.Column<float>(type: "real", nullable: false),
                    SlittingmachineId = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Ssx_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Station_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    station = table.Column<int>(type: "int", nullable: false),
                    X = table.Column<double>(type: "float", nullable: false),
                    Y = table.Column<double>(type: "float", nullable: false),
                    Map = table.Column<int>(type: "int", nullable: true),
                    Groupid = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Station_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "StationNet_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    station0 = table.Column<int>(type: "int", nullable: false),
                    station1 = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_StationNet_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Task_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TaskId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskType_TaskType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    MacTaskState = table.Column<int>(type: "int", nullable: false),
                    AGVID = table.Column<int>(type: "int", nullable: false),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    AreaType = table.Column<int>(type: "int", nullable: false),
                    MapType = table.Column<int>(type: "int", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    FullBakeState = table.Column<int>(type: "int", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Level = table.Column<int>(type: "int", nullable: false),
                    InterferenceTask = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    StationAction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FrontHeight = table.Column<float>(type: "real", nullable: false),
                    Height = table.Column<float>(type: "real", nullable: false),
                    BackHeight = table.Column<float>(type: "real", nullable: false),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ImplementTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FinishTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TagerFlow = table.Column<int>(type: "int", nullable: false),
                    ManipulatorId = table.Column<int>(type: "int", nullable: false),
                    OvenId = table.Column<int>(type: "int", nullable: false),
                    OvenPostion = table.Column<int>(type: "int", nullable: false),
                    SsxId = table.Column<int>(type: "int", nullable: false),
                    SsxPostion = table.Column<int>(type: "int", nullable: false),
                    FoilType = table.Column<int>(type: "int", nullable: false),
                    Oventime = table.Column<int>(type: "int", nullable: false),
                    ZC = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ManipulatorSour = table.Column<int>(type: "int", nullable: false),
                    ManipulatorTager = table.Column<int>(type: "int", nullable: false),
                    IsNoAgvTask = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Task_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "TaskType_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TaskType = table.Column<int>(type: "int", nullable: false),
                    AGVType = table.Column<int>(type: "int", nullable: false),
                    FrontMaterialType = table.Column<int>(type: "int", nullable: false),
                    BackMaterialType = table.Column<int>(type: "int", nullable: false),
                    ForntAction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TargetAction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RearAction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BackTaskType = table.Column<int>(type: "int", nullable: false),
                    PreTaskType = table.Column<int>(type: "int", nullable: false),
                    TaskPreTask = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskStartExcute = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TaskStartFinish = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    InterferenceTaskType = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TaskType_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "User_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    userName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    passWord = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    rollID = table.Column<int>(type: "int", nullable: false),
                    employeeID = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "Warehouse_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsHave = table.Column<bool>(type: "bit", nullable: false),
                    IsCreat = table.Column<bool>(type: "bit", nullable: false),
                    MaterialName = table.Column<int>(type: "int", nullable: false),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    PickAreaType = table.Column<int>(type: "int", nullable: false),
                    PutAreaType = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    OptronicsIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LigthIO = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetHeight = table.Column<float>(type: "real", nullable: false),
                    PutHeight = table.Column<float>(type: "real", nullable: false),
                    Unwind_Full = table.Column<int>(type: "int", nullable: false),
                    Unloading_Full = table.Column<int>(type: "int", nullable: false),
                    UnloadingTobeBake = table.Column<int>(type: "int", nullable: false),
                    Unwind_Null = table.Column<int>(type: "int", nullable: false),
                    Unloading_Null = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GoodX = table.Column<int>(type: "int", nullable: false),
                    GoodY = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Warehouse_Entity", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "WasteGet_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    TaskType = table.Column<int>(type: "int", nullable: false),
                    TaskTypeEmpty = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    GetHeigh = table.Column<float>(type: "real", nullable: false),
                    PutHeigh = table.Column<float>(type: "real", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WasteGet_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WastePut_Entity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Deviceid = table.Column<int>(type: "int", nullable: false),
                    Station = table.Column<int>(type: "int", nullable: false),
                    PreStation = table.Column<int>(type: "int", nullable: false),
                    BackStation = table.Column<int>(type: "int", nullable: false),
                    Area = table.Column<int>(type: "int", nullable: false),
                    Flow = table.Column<int>(type: "int", nullable: false),
                    IsEnable = table.Column<bool>(type: "bit", nullable: false),
                    TaskTypeGet = table.Column<int>(type: "int", nullable: false),
                    TaskTypePut = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WastePut_Entity", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Wireless_Entity",
                columns: table => new
                {
                    id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Devid = table.Column<int>(type: "int", nullable: false),
                    WirelessIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WirelessNum = table.Column<int>(type: "int", nullable: false),
                    Available = table.Column<bool>(type: "bit", nullable: false),
                    IsIOmodule = table.Column<bool>(type: "bit", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DIAdds = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DICounts = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DOAdds = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DOCounts = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Wireless_Entity", x => x.id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Abutment_Entity");

            migrationBuilder.DropTable(
                name: "AGV_Entity");

            migrationBuilder.DropTable(
                name: "Airexpansionshaft_Entity");

            migrationBuilder.DropTable(
                name: "AirShowerDoor");

            migrationBuilder.DropTable(
                name: "AreaType_Entity");

            migrationBuilder.DropTable(
                name: "AutomaticDoor_Entiy");

            migrationBuilder.DropTable(
                name: "DetectCache_Entity");

            migrationBuilder.DropTable(
                name: "DeviceStation_Entity");

            migrationBuilder.DropTable(
                name: "EmptyCache_Entity");

            migrationBuilder.DropTable(
                name: "FinishedGet_Entity");

            migrationBuilder.DropTable(
                name: "FinishedPut_Entity");

            migrationBuilder.DropTable(
                name: "FullCache_Entity");

            migrationBuilder.DropTable(
                name: "HistoricalTask_Entity");

            migrationBuilder.DropTable(
                name: "Lift_Entity");

            migrationBuilder.DropTable(
                name: "Manipulator_Entity");

            migrationBuilder.DropTable(
                name: "ManipulatorTB_Entity");

            migrationBuilder.DropTable(
                name: "MapType_Entity");

            migrationBuilder.DropTable(
                name: "MaterialName_Entity");

            migrationBuilder.DropTable(
                name: "MaterialType_Entity");

            migrationBuilder.DropTable(
                name: "Oven_Entity");

            migrationBuilder.DropTable(
                name: "OvenBeath");

            migrationBuilder.DropTable(
                name: "Processingline_Entity");

            migrationBuilder.DropTable(
                name: "QueueModel_Entity");

            migrationBuilder.DropTable(
                name: "Rawfoilmachine_Entity");

            migrationBuilder.DropTable(
                name: "Role_Entity");

            migrationBuilder.DropTable(
                name: "Roll_Entity");

            migrationBuilder.DropTable(
                name: "Slittingmachine_Entity");

            migrationBuilder.DropTable(
                name: "SlittingmachineCache_Entity");

            migrationBuilder.DropTable(
                name: "Ssx_Entity");

            migrationBuilder.DropTable(
                name: "Station_Entity");

            migrationBuilder.DropTable(
                name: "StationNet_Entity");

            migrationBuilder.DropTable(
                name: "Task_Entity");

            migrationBuilder.DropTable(
                name: "TaskType_Entity");

            migrationBuilder.DropTable(
                name: "User_Entity");

            migrationBuilder.DropTable(
                name: "Warehouse_Entity");

            migrationBuilder.DropTable(
                name: "WasteGet_Entity");

            migrationBuilder.DropTable(
                name: "WastePut_Entity");

            migrationBuilder.DropTable(
                name: "Wireless_Entity");
        }
    }
}
